package com.shelpe.services.sustainer.repository.jpa;

import org.springframework.data.repository.PagingAndSortingRepository;

import com.shelpe.services.sustainer.entity.jpa.InprogressAutoDriver;

public interface InprogressAutoDriverRepository extends PagingAndSortingRepository<InprogressAutoDriver, InprogressAutoDriver.PK> {

	InprogressAutoDriver findTopByStepAndDone(int step, int done);
	
	InprogressAutoDriver findTopByStepAndDoneOrderByProductsAsc(int step, int done);
	
	InprogressAutoDriver findTopByStepAndDoneAndProducts(int step, int done, int products);
	InprogressAutoDriver findTopByStepAndDoneAndProductsGreaterThanOrderByProductsAsc(int step, int done, int products);
	
	InprogressAutoDriver findTopByStepAndDoneAndProductsLessThanOrderByProductsAsc(int step, int done, int products);
}
